﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="RowClickEventArgs.cs" company="SmartPlan">
//   SmartPlan 2011
// </copyright>
// <summary>
//   Egy sor kiválasztásakor történő esemény jellemzőit tároló osztály
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace DbDiff.WinClient.Forms
{
    using System;
    using System.Data;
    using Common.Helper;

    /// <summary>
    /// Egy sor kiválasztásakor történő esemény jellemzőit tároló osztály
    /// </summary>
    public class RowClickEventArgs : EventArgs
    {
        /// <summary>
        /// The _data row.
        /// </summary>
        private readonly DataRow _dataRow;

        // melyik adatbázis - 0 v. 1
        /// <summary>
        /// The _database index.
        /// </summary>
        private readonly int _databaseIndex;

        /// <summary>
        /// The _db item type info.
        /// </summary>
        private readonly DatabaseObjectTypes _dbItemTypeInfo;

        /// <summary>
        /// Initializes a new instance of the <see cref="RowClickEventArgs"/> class.
        /// </summary>
        /// <param name="dataRow">
        /// The data row.
        /// </param>
        /// <param name="dbItemTypeInfo">
        /// The db item type info.
        /// </param>
        /// <param name="databaseIndex">
        /// The database index.
        /// </param>
        public RowClickEventArgs(DataRow dataRow, DatabaseObjectTypes dbItemTypeInfo, int databaseIndex)
        {
            this._dataRow = dataRow;
            this._dbItemTypeInfo = dbItemTypeInfo;
            this._databaseIndex = databaseIndex;
        }

        /// <summary>
        /// Gets DataRow.
        /// </summary>
        public DataRow DataRow
        {
            get { return this._dataRow; }
        }

        /// <summary>
        /// Gets DbItemTypeInfo.
        /// </summary>
        public DatabaseObjectTypes DbItemTypeInfo
        {
            get { return this._dbItemTypeInfo; }
        }

        /// <summary>
        /// Gets DatabaseIndex.
        /// </summary>
        public int DatabaseIndex
        {
            get { return this._databaseIndex; }
        }
    }
}